
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Won-松的趣味分享</title>
	<link rel="stylesheet" type="text/css" href="css/bass.css"/>
	<link rel="stylesheet" type="text/css" href="css/funstyle.css"/>
</head>
<body>
	<div class="wrap">
		<!--head-->
		<div class="w100">
			<!--head-top-->
			<div class="headtop w960 clearfix">
				<div class="logo fl"><a href="#"><img src="img/logo.png"></a></div>
		<?php
			include("function.php");
			$conn = conn();
			$resourse = mysqli_query($conn,"select * from nav");   
			while ($row = mysqli_fetch_assoc($resourse)){
		?>
				<div class="nav fl">
					<ul>
						<li class="fl ml25"><a href="<?php echo $row["addr"]?>"><?php echo $row['option']?></a></li>
				</div>
		<?php
			}
		?>
			</div>
			<div class="clear"></div>
			<!--head-background-->
			<div class="bg">
				<div class="title"><h2>趣味分享</h2></div>
				<ul class="clearfix">
					<li class='fl'><a href="funsharing.php">全部</a></li>
				<?php 
					$resourse = mysqli_query($conn,"select * from cata_log");   
					while ($data = mysqli_fetch_assoc($resourse)){
				?>
					<li class="fl"><a href="list.php?cata_id=<?=$data["id"]?>"><?=$data["class"]?></a></li>
				<?php 
					}

				?>
				</ul>
			</div>
		</div>
		<div class="clear"></div>
		<!--main-->
	<?php
		$resourse = mysqli_query($conn,"select * from article"); 
		while ($row = mysqli_fetch_assoc($resourse)){
	?>
		<div class="content w960 clearfix">
			<div class="left fl"><img src="<?php echo $row["img"]?>"></div>
			<div class="center fl">
				<a href="content.php?id=<?php echo $row['id']?>"><h2><?php echo $row["title"]?></h2></a>
				<p><?php echo $row["desc"]?></p>
			</div>
			<div class="right fl">
				<div>浏览次数：<?=$row['view']?></div>
				<div class="time"><?php echo date("Y-m-d H:i:s",$row["create_time"])?></div>
			</div>	
		</div>
	<?php
		}
	?>
	</di>
	<div class="bottom"><a href="#">置顶</a></div>
</body>
</html>